<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStartStop extends Migration{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(){
        Schema::create('start_stop', function(Blueprint $table){
            $table->engine = 'MyISAM';
            $table->comment = '启停记录表';
            $table->increments('id')->unsigned()->comment('自动增长主键');
            $table->integer('company_uid')->index('company_uid')->unsigned()->default(0)->comment('所属用户ID');
            $table->tinyInteger('status')->unsigned()->default(0)->comment('启停开启状态(0代表关闭，1代表开启)');
            $table->timestamp('created_at')->nullable()->comment('添加时间');;
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(){
        Schema::drop('start_stop');
    }
}
